#include <limits.h>
#include "gtest/gtest.h"
#include "subs/DataSourceSub.h"
#include "../include/DataSourceStatusWatcher.h"
#include "../include/WindowsTickSource.h"


// Tests factorial of negative numbers.
TEST(DataSourceStatusWatcherTest,ShouHaveThreeAdList) {
	// This test is named "Negative", and belongs to the "FactorialTest"
	// test case.
	WindowsTickSource tickSource;
	DataSource* dataSource=new DataSourceSub();
	AdListCacheManager* cacheManager=new AdListCacheManager();
	DataSourceStatusWatcher* watcher=new DataSourceStatusWatcher(dataSource,cacheManager);
	tickSource.SetListener(watcher);
	Sleep(3000);
	AdListForAllSlots* allAdList=cacheManager->GetAdListForAllSlots();
	EXPECT_EQ(3,allAdList->GetSlotCount());
}